abstract class LearningFactory {
  ///抽象方法
  String learning();
  ///业务代码
  void show() {
    String skill = learning();
    print(skill);
  }
}

class LearningWalk extends LearningFactory {
  @override
  String learning() {
    return "I can walk";
  }
}

class LearningRun extends LearningFactory {
  @override
  String learning() {
    return "I can run";
  }
}

main() {
  final walkResult = LearningWalk();
  final runResult = LearningRun();
  walkResult.show();
  runResult.show();
}